<?php

class MetaSlave {
	private $metaclass;
	public function SetMetaClass(MetaClass $value){ $this->metaclass = $value; }
	public function GetMetaClass(){ return $this->metaclass; }

	private $name;
	public function GetName(){ return $this->name; }
	public function SetName($value){ $this->name = $value; }
	
	private $is_aggressive = true;
	public function WithIsAggressive($value){ $this->is_aggressive = $value; return $this; }
	public function IsAggressive(){ return $this->is_aggressive; }

	private $slave_class_name;
	private $hook_dbfield_name;
	public function __construct($slave_class_name,$hook_dbfield_name){ $this->slave_class_name = $slave_class_name; $this->hook_dbfield_name = $hook_dbfield_name; }
	public function GetSlaveClassName(){ return $this->slave_class_name; }
	public function GetHookDBFieldName(){ return $this->hook_dbfield_name; }

	public function GetSlaveMetaClass(){ return MetaClass::Retrieve($this->slave_class_name); }

	private $label;
	public function GetLabel(){ return $this->label; }
	public function WithLabel($args){
		if ($args instanceof Lemma)
			$this->label = $args;
		else {
			$a = func_get_args();
      $z = func_num_args();
      if ($z == 1)
        $this->label = Lemma::Retrieve($a[0]);
      else
			  $this->label = new Lemma($a);
		}
		return $this;
	}

	private $is_volatile = false;
	public function WithIsVolatile($value){$this->is_volatile=$value;return $this;}
	public function IsVolatile(){ return $this->is_volatile; }


	public $Where = null;
	public function WithWhere($value){$this->Where=$value;return $this;}

	public $OrderBy = null;
	public function WithOrderBy($value){$this->OrderBy=$value;return $this;}
}


?>